home *** CD-ROM | disk | FTP | other *** search
/ Programmers Heaven 2 / Programmers Heaven 2.iso / files / windows / ocx / led.exe / LEDS3.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-21  |  6.4 KB  |  211 lines

  1. VERSION 4.00
  2. Begin VB.Form FrmLEDSample3 
  3.    Appearance      =   0  'Flat
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "LED - Bevel Sample"
  6.    ClientHeight    =   2595
  7.    ClientLeft      =   1425
  8.    ClientTop       =   2385
  9.    ClientWidth     =   5400
  10.    BeginProperty Font 
  11.       name            =   "MS Sans Serif"
  12.       charset         =   0
  13.       weight          =   700
  14.       size            =   8.25
  15.       underline       =   0   'False
  16.       italic          =   0   'False
  17.       strikethrough   =   0   'False
  18.    EndProperty
  19.    ForeColor       =   &H80000008&
  20.    Height          =   3000
  21.    Left            =   1365
  22.    LinkTopic       =   "Form1"
  23.    ScaleHeight     =   2595
  24.    ScaleWidth      =   5400
  25.    Top             =   2040
  26.    Width           =   5520
  27.    Begin VB.HScrollBar HScroll2 
  28.       Height          =   255
  29.       Left            =   1200
  30.       TabIndex        =   1
  31.       Top             =   2160
  32.       Width           =   1575
  33.    End
  34.    Begin VB.HScrollBar HScroll1 
  35.       Height          =   255
  36.       Left            =   1200
  37.       TabIndex        =   0
  38.       Top             =   1800
  39.       Width           =   1575
  40.    End
  41.    Begin LedLib.LED LED1 
  42.       Height          =   1335
  43.       Left            =   240
  44.       TabIndex        =   7
  45.       Top             =   240
  46.       Width           =   1335
  47.       _Version        =   131072
  48.       _ExtentX        =   2355
  49.       _ExtentY        =   2355
  50.       _StockProps     =   64
  51.       BevelInner      =   3
  52.       BevelShapeInner =   1
  53.       BevelOuter      =   1
  54.       BevelShapeOuter =   0
  55.       BevelWidthOuter =   1
  56.       BevelWidthInner =   1
  57.       BorderWidth     =   4
  58.       DisabledColor   =   12632256
  59.       OffColor        =   8421504
  60.       OnColor         =   255
  61.       Value           =   -1  'True
  62.    End
  63.    Begin VB.Label Label7 
  64.       Appearance      =   0  'Flat
  65.       Caption         =   $"leds3.frx":0000
  66.       BeginProperty Font 
  67.          name            =   "MS Sans Serif"
  68.          charset         =   0
  69.          weight          =   400
  70.          size            =   9.75
  71.          underline       =   0   'False
  72.          italic          =   0   'False
  73.          strikethrough   =   0   'False
  74.       EndProperty
  75.       ForeColor       =   &H80000008&
  76.       Height          =   1335
  77.       Left            =   1800
  78.       TabIndex        =   4
  79.       Top             =   240
  80.       Width           =   3375
  81.    End
  82.    Begin VB.Label Label5 
  83.       Appearance      =   0  'Flat
  84.       BackColor       =   &H80000005&
  85.       BackStyle       =   0  'Transparent
  86.       Caption         =   "BevelInner:"
  87.       BeginProperty Font 
  88.          name            =   "MS Sans Serif"
  89.          charset         =   0
  90.          weight          =   400
  91.          size            =   8.25
  92.          underline       =   0   'False
  93.          italic          =   0   'False
  94.          strikethrough   =   0   'False
  95.       EndProperty
  96.       ForeColor       =   &H80000008&
  97.       Height          =   255
  98.       Left            =   240
  99.       TabIndex        =   6
  100.       Top             =   2160
  101.       Width           =   975
  102.    End
  103.    Begin VB.Label Label4 
  104.       Appearance      =   0  'Flat
  105.       BackColor       =   &H80000005&
  106.       BackStyle       =   0  'Transparent
  107.       Caption         =   "BevelOuter:"
  108.       BeginProperty Font 
  109.          name            =   "MS Sans Serif"
  110.          charset         =   0
  111.          weight          =   400
  112.          size            =   8.25
  113.          underline       =   0   'False
  114.          italic          =   0   'False
  115.          strikethrough   =   0   'False
  116.       EndProperty
  117.       ForeColor       =   &H80000008&
  118.       Height          =   255
  119.       Left            =   240
  120.       TabIndex        =   5
  121.       Top             =   1800
  122.       Width           =   975
  123.    End
  124.    Begin VB.Label Label2 
  125.       Appearance      =   0  'Flat
  126.       BackColor       =   &H80000005&
  127.       BackStyle       =   0  'Transparent
  128.       Caption         =   "Label2"
  129.       BeginProperty Font 
  130.          name            =   "MS Sans Serif"
  131.          charset         =   0
  132.          weight          =   400
  133.          size            =   8.25
  134.          underline       =   0   'False
  135.          italic          =   0   'False
  136.          strikethrough   =   0   'False
  137.       EndProperty
  138.       ForeColor       =   &H80000008&
  139.       Height          =   255
  140.       Left            =   2880
  141.       TabIndex        =   3
  142.       Top             =   2160
  143.       Width           =   1815
  144.    End
  145.    Begin VB.Label Label1 
  146.       Appearance      =   0  'Flat
  147.       BackColor       =   &H80000005&
  148.       BackStyle       =   0  'Transparent
  149.       Caption         =   "Label1"
  150.       BeginProperty Font 
  151.          name            =   "MS Sans Serif"
  152.          charset         =   0
  153.          weight          =   400
  154.          size            =   8.25
  155.          underline       =   0   'False
  156.          italic          =   0   'False
  157.          strikethrough   =   0   'False
  158.       EndProperty
  159.       ForeColor       =   &H80000008&
  160.       Height          =   255
  161.       Left            =   2880
  162.       TabIndex        =   2
  163.       Top             =   1800
  164.       Width           =   1815
  165.    End
  166. Attribute VB_Name = "FrmLEDSample3"
  167. Attribute VB_Creatable = False
  168. Attribute VB_Exposed = False
  169. Option Explicit
  170. Private Sub Form_Load()
  171.     HScroll1.Value = LED1.BevelOuter
  172.     HScroll1.Min = 0
  173.     HScroll1.Max = 4
  174.     HScroll2.Value = LED1.BevelInner
  175.     HScroll2.Min = 0
  176.     HScroll2.Max = 4
  177.     LED1.BevelWidthInner = 2
  178.     LED1.BevelWidthOuter = 2
  179.     LED1.BorderWidth = 4
  180.     Call HScroll1_Change
  181.     Call HScroll2_Change
  182. End Sub
  183. Private Function FormatBevel(BevelValue)
  184.     Select Case BevelValue
  185.         Case 0:
  186.             FormatBevel = "None"
  187.         Case 1:
  188.             FormatBevel = "Raised"
  189.         Case 2:
  190.             FormatBevel = "Inset"
  191.         Case 3:
  192.             FormatBevel = "Lowered"
  193.         Case 4:
  194.             FormatBevel = "Solid"
  195.     End Select
  196. End Function
  197. Private Sub HScroll1_Change()
  198.     LED1.BevelOuter = HScroll1.Value
  199.     Label1.Caption = FormatBevel(CInt(HScroll1.Value)) & " (" & HScroll1.Value & ")"
  200. End Sub
  201. Private Sub HScroll1_Scroll()
  202.     Call HScroll1_Change
  203. End Sub
  204. Private Sub HScroll2_Change()
  205.     LED1.BevelInner = HScroll2.Value
  206.     Label2.Caption = FormatBevel(CInt(HScroll2.Value)) & " (" & HScroll2.Value & ")"
  207. End Sub
  208. Private Sub HScroll2_Scroll()
  209.     Call HScroll2_Change
  210. End Sub
  211.